﻿@namespace BlazorDemo.Pages.CodeSnippets

<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTimeEdit-1#set-a-time-range">
    <CodeSnippetTabPage Text="Razor">@(@"<DxTimeEdit @bind-Time=""@TimeValue""
            MinTime=""@MinTime""
            MaxTime=""@MaxTime"">
</DxTimeEdit>

@code {
    TimeSpan TimeValue { get; set; } = DateTime.Now.TimeOfDay;
    TimeSpan MinTime { get; set; }
    TimeSpan MaxTime { get; set; }

    protected override void OnInitialized() {
        MinTime = new TimeSpan(TimeValue.Hours, 0, 0);
        MaxTime = new TimeSpan(TimeValue.Hours, 59, 59);
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
